*combine BPS file with baseline variables, school attendance, and outcome data


	use "$data_clean/sims_ma_wide.dta", clear

			duplicates drop
			
		*merge sims baseline
		merge 1:1 sasid using "$data_clean/baselinedemos_ma.dta", keep(1 3) nogen
		

	
******************************************************************
**** Merge on outcomes 
***************************************
		
		*merge mcas
		merge 1:1 sasid using "$data_clean/mcas_wide.dta", keep(1 3) nogen
		
		*ap
		merge 1:1 sasid using "$data_clean/ap.dta", keep(1 3) nogen
		
		*sat
		merge 1:1 sasid using "$data_clean/sat.dta", keep(1 3) nogen
		
		*merge hsgrad
		merge 1:1 sasid using "$data_clean/hsgrad_ma.dta", keep(1 3) nogen
		
		*nsc degrees
		merge 1:1 sasid using "$data_clean/flat_degrees_NSC_ma.dta" , keep(1 3) nogen
		
		*merge nsc enrollment
		merge 1:1 sasid using  "$data_clean/flat_enrollment_NSC_ma.dta" , keep(1 3) nogen //also an option for the "LTO" version of this file
		
		*voting
		merge 1:1 sasid using "$data/sims_voting_all.dta", keep(1 3) nogen 
		
	*merge SSDR
		merge 1:1 sasid using "$data_clean/ssdr_wide", keep(1 3) nogen
		drop *2020 *2021 *2022 *2023
				
	
	g opeid = ID_FSC_firstinst  
	destring opeid, replace

	merge m:1 opeid using "$data_clean\chetty_college.dta", nogen  force keep(1 3) ///
		keepusing(k_mean k_mean_m k_mean_f opeid superopeid institution_name superopeid_name *mean*insuff* *mean*never*) 
		ren institution_name institution_name
			ren superopeid_name superopeid_name
	
	*spread insufficient and never attend outcomes
	foreach v of varlist *_insuff* *_never* {
		egen max=max(`v') 
		replace `v'=max
		drop max
	}
	
	
	*** replace k_mean for those who don't attend college
	***** note there are a few colleges that don't match and those get a different number	  
	replace k_mean = k_mean_insuff if k_mean==.&opeid!=. // insufficient data college

	g k_mean_bygender=k_mean_m if baselinefemale==0
	replace k_mean_bygender=k_mean_f if baselinefemale==1
	replace k_mean_bygender = k_mean_m_insuff if  k_mean_bygender==.&opeid!=.&baselinefemale==0 // insufficient data college
	replace k_mean_bygender =  k_mean_f_insuff if  k_mean_bygender==.&opeid!=.&baselinefemale==1 // insufficient data college
	
		replace k_mean= k_mean_never if k_mean==. // do not attend
		replace k_mean_bygender = k_mean_m_never if  k_mean_bygender==. & baselinefemale==0 // do not attend
		replace k_mean_bygender = k_mean_f_never if  k_mean_bygender==. & baselinefemale==1 // do not attend
	
	
// end chetty
		

*baseline
	
	* SCORES
	g baseline_m=c_state_mrawsc8 
	g baseline_e=c_state_erawsc8
	g twoyearsout_e= c_state_erawsc10
	g twoyearsout_m= c_state_mrawsc10
	
		
	g hasbaseline_m=(baseline_m~=.)
	g hasbaseline_e=(baseline_e~=.)
		

	


	
	
******************************************************************
**** Create/process outcomes as needed ****
******************************************************************


*ontime grade progression based on 9th grade
foreach n of numlist 10/12{
	local plus = `n'-9
	g ontime`n'=(year`n'<=(year9+`plus'))
	replace ontime`n'=0 if year`n'==.
	*restrict repeaters to ontime in grade
g repeat`n'=0 if ontime`n'==1
replace repeat`n'=1 if repeats`n'>=1&repeats`n'!=.
}	


*Process SAT
	gen satreason=satvrecn+satmrecn
	gen took_sat=satmrecn!=. //note no writing in class of 2017

	gen above_lowq_satvrecn = satvrecn>=430 & satvrecn!=.
	gen above_lowq_satmrecn = satmrecn>=440 & satmrecn!=.
	gen above_lowq_satw = satw>=420 & satw!=.
	gen above_lowq_satreason=satreason>=880 & satreason!=.
	gen above_lowq_sattot=  sattot>=1310 & sattot!=.

	gen above_median_satvrecn = satvrecn>=500 & satvrecn!=.
	gen above_median_satmrecn = satmrecn>=520 & satmrecn!=.
	gen above_median_satw = satw>=500 & satw!=.
	gen above_median_satreason=satreason>=1020 & satreason!=.
	gen above_median_sattot=  sattot>=1520 & sattot!=.

	gen above_thirdq_satvrecn = satvrecn>=580 & satvrecn!=.
	gen above_thirdq_satmrecn = satmrecn>=600 & satmrecn!=.
	gen above_thirdq_satw = satw>=580 & satw!=.
	gen above_thirdq_satreason=satreason>=1170 & satreason!=.
	gen above_thirdq_sattot=  sattot>=1750 & sattot!=.

	foreach v of varlist took_sat satreason sat* above* {
		replace `v'=. if proj_year<2007
		}
	
	
	 ren took_sat took_sat
	 ren sattot score_sattot
	 foreach v of varlist satvrecn satmrecn satw satreason{
		g took_`v'=`v'!=.
		g score_`v'=`v'
		}
	
	***************
	*ALL AP TESTS *
	***************
	local aptest1 "ushistgr arthisgr artstdgr biolgr chemgr chinesgr comscagr comscbgr econmigr econmagr englangr englitgr envscigr eurhisgr frnlangr frenltgr gerlagr govusgr govcomgr italgr"
	local aptest2 "japangr latinvgr latincgr calcabgr calcbcgr musictgr physbgr physmgr physemgr psychgr spanlagr spanltgr statgr humgeogr art3dgr wdhistgr artst2gr"
	  
	*GENERATE TOOK-X-TEST	
	foreach x in `aptest1' `aptest2' {
		replace ap_`x' = 0 if ap_`x' ==.
		gen took_ap_`x' = (ap_`x' > 0 & ap_`x' < 6)
	}


	*D.SUN 4-15-2013
	*CHANGE SLUGGING DEFITION - WHOEVER SCORE 1, CHANGES IT TO 0
	foreach x in `aptest1' `aptest2' {
		replace ap_`x' = 0 if ap_`x' ==1 & took_ap_`x'==1

	}

	*GENERATE NEW VARS
	egen took_any = rowmax(took_ap_*)
	egen N_aps_taken = rowtotal(took_ap_*)
	egen max_ap_taken = rowmax(ap_*)
	  
	forv i = 1(1)5{
		gen above_s`i'_any = (max_ap_taken >= `i')
	}

	egen sum_ap = rowtotal(ap_*)
	replace sum_ap = 0 if took_any == 0
	count if sum_ap == 0
	su sum_ap if took_any==1
	  
	drop max_ap_score n_ap

	*****************
	* CALCULUS 
	* AB / BC 
	*****************
	local calc "calcabgr calcbcgr"
	foreach x in `calc' {
		replace ap_`x' = 0 if took_ap_`x' == 0
	}

	egen ap_calc = rowmax(ap_calcabgr ap_calcbcgr)
	egen took_ap_calc = rowmax(took_ap_calcabgr took_ap_calcbcgr)

	
	*****************
	* US
	* hist or gov 
	*****************
	local us "ushistgr govusgr"
	foreach x in `us' {
		replace ap_`x' = 0 if took_ap_`x' == 0
	}

	egen ap_ushistgov = rowmax(ap_ushistgr ap_govusgr)
	egen took_ap_ushistgov = rowmax(took_ap_ushistgr took_ap_govusgr)
	
	*****************
	*economics
	* micro or macro 
	*****************
	local us "econmi econma"
	foreach x in `us' {
		replace ap_`x' = 0 if took_ap_`x' == 0
	}

	egen ap_econ = rowmax(ap_econmi ap_econma)
	egen took_ap_econ = rowmax(took_ap_econmi took_ap_econma)
	
	*****************
	* ENGLISH
	* LITER/LANGUAGE 
	*****************
	local engl "englitgr englangr"
	foreach x in `engl' {
		replace ap_`x' = 0 if took_ap_`x' == 0
	}

	egen ap_engl = rowmax(ap_englitgr ap_englangr)
	egen took_ap_engl = rowmax(took_ap_englitgr took_ap_englangr)
	
	*****************
	* SPANISH
	* LITER/LANGUAGE 
	*****************
	local span "spanltgr spanlagr"
	foreach x in `span' {
		replace ap_`x' = 0 if took_ap_`x' == 0
	}

	egen ap_span = rowmax(ap_spanltgr ap_spanlagr)
	egen took_ap_span = rowmax(took_ap_spanlagr took_ap_spanltgr)
	
	*****************
	* ANY FOREIGN LANGUAGE
	* LITER/LANGUAGE 
	*****************
	*nobody takes  ap_latincgr ap_frenltgr 
	local lang " ap_chinesgr ap_frnlangr  ap_gerlagr ap_italgr ap_japangr ap_latinvgr  ap_spanlagr ap_spanltgr"
	foreach x in `lang' {
		replace `x' = 0 if took_`x' == 0
	}

	egen ap_language = rowmax( ap_chinesgr ap_frnlangr ap_frenltgr ap_gerlagr ap_italgr ap_japangr ap_latinvgr ap_latincgr ap_spanlagr ap_spanltgr)
	egen took_ap_language = rowmax( took_ap_chinesgr took_ap_frnlangr took_ap_frenltgr took_ap_gerlagr took_ap_italgr took_ap_japangr took_ap_latinvgr took_ap_latincgr took_ap_spanlagr took_ap_spanltgr)
	 

	*****************
	*THE CATEGORIES *
	*****************
	local science "ap_biolgr ap_chemgr ap_comscagr ap_comscbgr ap_envscigr ap_physbgr ap_physmgr ap_physemgr" 
	local science_new "tap_biolgr tap_chemgr tap_comscagr tap_comscbgr tap_envscigr tap_physbgr tap_physmgr tap_physemgr" 

	local took_science ""
	foreach x in `science' {
		local took_science "`took_science' took_`x'"
	}

	foreach x in `science' {
		replace `x' =0 if took_`x'==0
	}
	egen took_science = rowmax(`took_science')
	egen N_science_taken = rowtotal(`took_science')
	egen max_science_taken = rowmax(`science')
	egen sum_science = rowtotal(`science')
	g ap_science=max_science_taken

	
	*****************
	*THE TOP 3 MOST *
	*POPULAR FILES  *
	*****************
	local thebig3subs "calc ushistgr engl stat"
	foreach x in `thebig3subs' {
		
		replace ap_`x' =0 if took_ap_`x'==0
		}
	foreach x in	calc ushistgr engl science span  ushistgov econ  stat language{

		gen above_s2_`x' = (ap_`x' >= 2)
		gen above_s3_`x' = (ap_`x' >= 3)
		gen above_s4_`x' = (ap_`x' >= 4)
		gen above_s5_`x' = (ap_`x' >= 5)

	}
	 
	 ren took_ap_* took_*

	
	foreach v of varlist took_* ap_* above_* {
		replace `v'=. if proj_year<2007
		}
		

***********************************************
* Process 10th grade MCAS scores 
***********************************************	
g first_escaleds10 = escaleds10
g first_mscaleds10= mscaleds10

*CODE A DUMMY FOR PASSING THREASHOLD IN FIRST TRY *
local type "first "
*NEEDS IMPROVEMENT
foreach t in `type' {
	gen `t'_ni =  (`t'_escaleds10 >= 220 & `t'_mscaleds10 >= 220 & proj_year12 >= 2003 & proj_year12 <=2020)
	replace `t'_ni = 0 if (`t'_escaleds10 < 220|`t'_mscaleds10 < 220)
	replace `t'_ni = . if `t'_escaleds10 ==.|`t'_mscaleds10 ==. 	
	replace `t'_ni = . if proj_year12==. 
}
*MEET COMPETENCY DETERMINATION
foreach t in `type' {
	gen `t'_pass = ((`t'_escaleds10 >= 220 & `t'_mscaleds10 >= 220 & proj_year12 >= 2003 & proj_year12 <=2009)| ///
	(`t'_escaleds10 >= 240 & `t'_mscaleds10 >= 240 & proj_year12 >= 2010 & proj_year12 <=2020))
	replace `t'_pass = 0 if (`t'_escaleds10 < 220|`t'_mscaleds10 < 220) 
	replace `t'_pass = . if `t'_escaleds10 ==.|`t'_mscaleds10 ==. 				  
	replace `t'_pass = . if proj_year12==.
}
*PROFICIENT
foreach t in `type' {
	gen `t'_profi = (`t'_escaleds10 >= 240 & `t'_mscaleds10 >= 240 & proj_year12 >= 2003 & proj_year12 <=2020)
	replace `t'_profi = 0 if (`t'_escaleds10 < 240|`t'_mscaleds10 < 240)  
	replace `t'_profi = . if `t'_escaleds10 ==.|`t'_mscaleds10 ==. 				  
	replace `t'_profi = . if proj_year12==.
}
*ADVANCED  
foreach t in `type' {
	gen `t'_adv = (`t'_escaleds10 >= 260 & `t'_mscaleds10 >= 260 & proj_year12 >= 2003 & proj_year12 <=2020)
	replace `t'_adv = 0 if (`t'_escaleds10 < 260|`t'_mscaleds10 < 260)  			  
	replace `t'_adv = . if `t'_escaleds10 ==.|`t'_mscaleds10 ==. 				  
	replace `t'_adv = . if proj_year12==.
} 
 
*GENERATE ELA AND MATH FIRST-ATTEMPTS DUMMIES *
foreach x in e m {   
	foreach t in `type' {  
	
		gen `x'_`t'_ni = (`t'_`x'scaleds10 >= 220 & proj_year12 >= 2003 & proj_year12 <=2020)
		replace `x'_`t'_ni = 0 if (`t'_`x'scaleds10 < 220)  
		replace `x'_`t'_ni = . if `t'_`x'scaleds10 ==.				  
		replace `x'_`t'_ni = . if proj_year12==.

		gen `x'_`t'_pass = ((`t'_`x'scaleds10 >= 220 & proj_year12 >= 2003 & proj_year12 <=2009)| ///
		(`t'_`x'scaleds10 >= 240 & proj_year12 >= 2010 & proj_year12 <=2020))
		replace `x'_`t'_pass = 0 if (`t'_`x'scaleds10 < 220)  
		replace `x'_`t'_pass = . if `t'_`x'scaleds10 ==.			  
		replace `x'_`t'_pass = . if proj_year12==.

		gen `x'_`t'_profi = (`t'_`x'scaleds10 >= 240 & proj_year12 >= 2003 & proj_year12 <=2020)
		replace `x'_`t'_profi = 0 if (`t'_`x'scaleds10 < 240)  
		replace `x'_`t'_profi = . if `t'_`x'scaleds10 ==.				  
		replace `x'_`t'_profi = . if proj_year12==.

		gen `x'_`t'_adv = (`t'_`x'scaleds10 >= 260 & proj_year12 >= 2003 & proj_year12 <=2020)
		replace `x'_`t'_adv = 0 if (`t'_`x'scaleds10 < 260)  
		replace `x'_`t'_adv = . if `t'_`x'scaleds10 ==.  				  
		replace `x'_`t'_adv = . if proj_year12==.
		
	}		
}

*CODE A DUMMY FOR ADAMS SCHOLARSHIP EIGIBILITY * 
gen first_combined = first_escaleds10 + first_mscaleds10 

gen temp1 = (escaleds10 >= 240 & mscaleds10 >= 240 & mscaleds10 ~=. & escaleds10 ~=.)
replace temp1 =. if escaleds10 ==.|mscaleds10==.
replace temp1 =. if proj_year12==.
gen temp2 = ((escaleds10 >= 260|mscaleds10 >=260) & mscaleds10 ~=. & escaleds10 ~=.)
replace temp2 =. if escaleds10 ==.|mscaleds10==.
replace temp2 =. if proj_year12 ==.
gen temp3 = ((first_combined >= 502 & proj_year12 == 2005 & first_combined ~=.)| ///
		     (first_combined >= 502 & proj_year12 == 2006 & first_combined ~=.)| ///
             (first_combined >= 504 & proj_year12 == 2007 & first_combined ~=.)| ///
             (first_combined >= 512 & proj_year12 == 2008 & first_combined ~=.)| ///
             (first_combined >= 510 & proj_year12 == 2009 & first_combined ~=.)| ///
             (first_combined >= 516 & proj_year12 == 2010 & first_combined ~=.)| ///
	         (first_combined >= 516 & proj_year12 == 2011 & first_combined ~=.)| ///
			 (first_combined >= 516 & proj_year12 == 2012 & first_combined ~=.)| ///
			 (first_combined >= 516 & proj_year12 == 2013 & first_combined ~=.)| ///
			 (first_combined >= 516 & proj_year12 == 2014 & first_combined ~=.)| ///
			 (first_combined >= 520 & proj_year12 == 2015 & first_combined ~=.))
replace temp3=. if first_combined ==.	
replace temp3=. if proj_year12 ==.
		 	 //bsed on BPS -- recode with schools? 
gen adams_elgh = (temp1==1 & temp2==1 & temp3==1)
replace adams_elgh =. if temp1==. & temp2==. & temp3==.
drop temp1 temp2 temp3


*LABEL MCAS OUTCOMES *
label var adams_elgh "eligible for adams using BPS cutoff"
label var first_pass "a dummy for passing the threshold for the first time"
label var first_ni "a dummy for passing NI"
label var first_profi "a dummy for passing proficiency of 240"
label var first_adv "a dummy for passing proficiency of 260"
label var first_escaleds10 "ELA scaled score at first taking"
label var first_mscaleds10 "Math scaled score at first taking"

		
*UPDATE THIS WHEN ADD NEW DATA !!!!!!!!!
		*Limit some outcomes to appropriate years
		
		*SAT/AP should be limited to those who reach projected senior year in year of data
		foreach v of varlist   took_*	 N_aps_taken	///
		  took_sat* above*  above* {
			replace `v'=0 if `v'==. & proj_year12<=2019 //update when process AP/SAT -- last update is from 2019
			replace `v'=. if  proj_year12>2019|proj_year12<=2007 //SAT and AP outcomes not available before class of 2007
			}	
			
		*HS grad must have SIMS of relenvant spring
		foreach v of varlist  hsgrad_4yr {
			replace `v'=0 if `v'==. & proj_year12<=2022 //update when process sims
			replace `v'=. if  proj_year12>2022
			}
		foreach v of varlist  hsgrad_5yr {
			replace `v'=0 if `v'==. & proj_year12<=2021 //update when process sims
			replace `v'=. if  proj_year12>2021
			}
		foreach v of varlist hsgrad_6yr  {
			replace `v'=0 if `v'==. & proj_year12<=2020 //update when process sims
				replace `v'=. if  proj_year12>2020
		}			
		
		*NSC -- each year fills in a little more but, must have graduating class at the very least
	foreach v of varlist att*Y1* {
			replace `v'=0 if `v'==. & proj_year12<=2023
				replace `v'=. if  proj_year12>2023
		}		
		foreach v of varlist att*Y2* {
			replace `v'=0 if `v'==. & proj_year12<=2022
				replace `v'=. if  proj_year12>2022
		}
		foreach v of varlist att*Y3* cmp*Y3*{
			replace `v'=0 if `v'==. & proj_year12<=2021
				replace `v'=. if  proj_year12>2021
		}
		foreach v of varlist att*Y4* cmp*Y4*{
			replace `v'=0 if `v'==. & proj_year12<=2020
				replace `v'=. if  proj_year12>2020
		}
		foreach v of varlist att*Y5* cmp*Y5* {
			replace `v'=0 if `v'==. & proj_year12<=2019
					replace `v'=. if  proj_year12>2019
		}
		foreach v of varlist att*Y6* cmp*Y6*{
			replace `v'=0 if `v'==. & proj_year12<=2018
				replace `v'=. if  proj_year12>2018
		}
		foreach v of varlist att*Y7* cmp*Y7* {
			replace `v'=0 if `v'==. & proj_year12<=2017
				replace `v'=. if  proj_year12>2017
		}
		foreach v of varlist att*Y8* cmp*Y8*{
			replace `v'=0 if `v'==. & proj_year12<=2016
				replace `v'=. if  proj_year12>2016
		}
		
		
		
*college persistence
foreach n of numlist 4/7{
	g persist_byY`n'=0 if att_any_byY`n'!=.
	g colyrs_4yr_byY`n'= 0 if att_any_byY`n'!=.
	replace colyrs_4yr_byY`n' = (att_4yr_inY1fall+att_4yr_inY2fall +att_4yr_inY3fall+att_4yr_inY4fall+att_4yr_inY1spring+att_4yr_inY2spring +att_4yr_inY3spring+att_4yr_inY4spring)/2 if att_any_byY`n'!=.
		if `n'== 5		replace colyrs_4yr_byY`n'= colyrs_4yr_byY`n'+(att_4yr_inY5fall+att_4yr_inY5spring)/2 if att_any_byY`n'!=.
		if `n'== 6		replace colyrs_4yr_byY`n'= colyrs_4yr_byY`n'+(att_4yr_inY6fall+att_4yr_inY6spring)/2 if att_any_byY`n'!=.
		if `n'== 7		replace colyrs_4yr_byY`n'= colyrs_4yr_byY`n'+(att_4yr_inY7fall+att_4yr_inY7spring)/2 if att_any_byY`n'!=.
	g colyrs_2yr_byY`n'= 0 if att_any_byY`n'!=.
		replace colyrs_2yr_byY`n' = (att_2yr_inY1fall+att_2yr_inY2fall +att_2yr_inY3fall+att_2yr_inY4fall+att_2yr_inY1spring+att_2yr_inY2spring +att_2yr_inY3spring+att_2yr_inY4spring)/2 if att_any_byY`n'!=.
		if `n'== 5		replace colyrs_2yr_byY`n'= colyrs_2yr_byY`n'+(att_2yr_inY5fall+att_2yr_inY5spring)/2 if att_any_byY`n'!=.
		if `n'== 6		replace colyrs_2yr_byY`n'= colyrs_2yr_byY`n'+(att_2yr_inY6fall+att_2yr_inY6spring)/2 if att_any_byY`n'!=.
		if `n'== 7		replace colyrs_2yr_byY`n'= colyrs_2yr_byY`n'+(att_2yr_inY7fall+att_2yr_inY7spring)/2 if att_any_byY`n'!=.
	replace persist_byY`n'=1 if cmp_BA_byY`n'==1 & att_any_byY`n'!=.
	replace persist_byY`n'=1 if colyrs_4yr_byY`n'>=4 &  att_any_byY`n'!=.
	replace persist_byY`n'=1 if colyrs_2yr_byY`n'>=2 & colyrs_4yr_byY`n'>=2 & att_any_byY`n'!=.
}		

******************************************************
		******************Voting***************
******************************************************

	
g byear = year(baselinedob)
g bmonth = month(baselinedob)
g bday = day(baselinedob)
g year18 = byear + 18
	
g turn18=mdy(bmonth,bday,year18)
drop byear bmonth bday year18
format turn18 %d
format baselinedob %d


foreach  n  in 8nov2016 4nov2014 6nov2012 2nov2010 4nov2008 7nov2006  {
	gen atleast18_`n'=(turn18 - td(`n'))<=0
	 
	}
 
gen atleast18=(turn18 - td(8nov2016))<=0


	***************
	* SSDR 
	***************
	
	foreach var in day_suspension inschsus_sum outschsus_sum {
		forvalues i = 9(1)12 {
			g `var'`i' = .
				forval year = 2004/2019 {
					replace `var'`i' = `var'`year' if year`i'==`year'
		}	
	  }
	}
	
drop outschsus_sum20* inschsus_sum20* day_suspension20*
	
foreach var in day_suspension outschsus_sum inschsus_sum {

egen rowtot10_`var' = rowtotal(`var'9-`var'12)
g `var'= .
replace `var' =  rowtot10_`var' 
}	
	
gen ever_suspension = 0 
gen ever_outschsus = 0 
gen ever_inschsus= 0

replace ever_suspensio = 1 if day_suspension> 0
replace ever_outschsus = 1 if outschsus_sum > 0
replace ever_inschsus = 1 if inschsus_sum > 0

drop *day_suspension *outschsus_sum *inschsus_sum


qui compress

preserve

		save "$data\descriptivesfile_ma.dta", replace
	keep if masscode9!=.

	keep if proj_year12<=2017&proj_year12>2006&atleast18_8nov2016 ==1
			save "$data\descriptivesfile_ma9th.dta", replace
			
restore

				*ID folks in BPS in 9th grdae for appropriate years
	keep if bps9==1
	keep if proj_year12<=2017&proj_year12>2006&atleast18_8nov2016 ==1
			save "$data\descriptivesfile_bps9th.dta", replace

